package com.huawei.cloud.phone.management.domain.connection;

import com.huawei.cloud.phone.management.common.BeanFactory;
import com.huawei.cloud.phone.management.common.GlobalConfig;
import lombok.Data;

import java.io.Serializable;

@Data
public class ConnectionParam implements Serializable {
    static final long serialVersionUID = -7034897190745766111L;

    private Integer backgroundTimeout;

    private Integer availablePlayTime;

    private Integer touchTimeout;

    public ConnectionParam() {
        GlobalConfig globalConfig = BeanFactory.getBean(GlobalConfig.class);
        this.backgroundTimeout = globalConfig.getBackgroundTimeout();
        this.availablePlayTime = globalConfig.getAvailablePlayTime();
        this.touchTimeout = globalConfig.getTouchTimeout();
    }
}
